# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=tilda
pkgver=1.5.4
pkgrel=2
pkgdesc="A Gtk based drop down terminal for Linux and Unix"
url="https://github.com/lanoxx/tilda"
arch="all"
license="GPL-2.0-or-later"
depends="procps"
makedepends="automake autoconf libtool
	confuse-dev vte3-dev libx11-dev libxml2-utils
	pcre2-dev"
subpackages="$pkgname-lang"
source="https://github.com/lanoxx/tilda/archive/tilda-$pkgver.tar.gz
	0001-Fix-OOB-write-in-start_default_shell.patch"
builddir="$srcdir"/$pkgname-$pkgname-$pkgver

prepare() {
	default_prepare
	NOCONFIGURE=1 ./autogen.sh
}

build() {
	./configure \
		--prefix=/usr \
		--disable-maintainer-mode \
		--enable-lto \
		--enable-vte-2.91 \
		--disable-rpath
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
6982a14a89d148c04e08df0c7566ea7b3e340252fa1a3e434450443f7464e6805caee46afda9b385633a4b9c22d2f2d283641082a1e009f301c3a1bf508c3b29  tilda-1.5.4.tar.gz
0d35288b4527063a672d4d0cbd9a4da2636df1b4477ea5e654562d4e93f51a3d82ee3c24fe2eff792d190923f1136c0fc95630d6651d4245ca2ca0c2783c3aaa  0001-Fix-OOB-write-in-start_default_shell.patch
"
